﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Forest.Cat.Domain.Entities;
using Forest.Cat.Domain.Shared;

namespace Forest.Cat.Domain.Configuration
{

    public interface ILovService
    {
        /// <summary>
        /// 获取所有列表
        /// </summary>
        /// <returns></returns>
        List<Lov> GetAll();

        /// <summary>
        /// 通过值获取对应名称
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        String GetLovName(int value);

        /// <summary>
        /// 获取指定类型的Lov列表
        /// </summary>
        /// <param name="lovType"></param>
        /// <returns></returns>
        IQueryable<Lov> GetLovList(LovType lovType);

        /// <summary>
        /// 根据id获取值
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        Lov GetLovById(Guid guid);

        /// <summary>
        /// 根据上级id获取列表
        /// </summary>
        /// <param name="guid"></param>
        /// <returns></returns>
        IQueryable<Lov> GetLovByParentId(Guid guid);

        Lov GetParent(int value);

        /// <summary>
        /// 根据标签名称检索
        /// </summary>
        /// <param name="label"></param>
        /// <returns></returns>
        IQueryable<Lov> GetLovByParentLabel(string label);

        /// <summary>
        /// 获取发布日期
        /// </summary>
        /// <param name="postedDateLovValue"></param>
        /// <returns></returns>
        DateTime? GetPostedDate(int postedDateLovValue);

        /// <summary>
        /// 获取发布日期
        /// </summary>
        /// <param name="postedDateType"></param>
        /// <returns></returns>
        DateTime? GetPostedDate(PostedDateType postedDateType);

        /// <summary>
        /// 获取职位类别的子列表
        /// </summary>
        /// <returns></returns>
        IQueryable<Lov> GetSubJobCategoryList();

        /// <summary>
        /// 根据类型获取子列表
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        IQueryable<Lov> GetSubListByParentValue(LovType type);
    }
}
